Using postman I can't connect and send data to the same link.
But working with websocketpeer, it works only when i use it on localhost and not with the https nginx server.
In browser html5 I have error websocket connection to domain.com failed, and the code in gdscript of the client is. It doesnt work on godot client also when using hte public domain.
extends Node
var socket = WebSocketPeer.new()
func _ready():
var err = socket.connect_to_url("wss://mustafalou.com/wsapp")
if err != OK:
print("Unable to connect")
else:
print("Connected to server")
func _process(_delta):
socket.poll()
if socket.get_ready_state() == WebSocketPeer.STATE_OPEN
getMessage()
|